<template>
  <div>
    <van-nav-bar
      title="个人信息"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    >
      <template #right>
        <van-image
          round
          width="1rem"
          height="1rem"
          fit="contain"
          :src="this.userInfo.photo"
        />
      </template>
    </van-nav-bar>
    <div class="container">
      <p>用户名：{{ userInfo.username }}</p>
      <p>人生格言：{{ userInfo.motto }}</p>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      userInfo: JSON.parse(localStorage.getItem("userInfo")),
    };
  },
  created() {},
  computed: {},
  methods: {
    onClickLeft() {
      /* console.log(1); */
      this.$router.go(-1);
    },
  },
};
</script>
<style lang="scss" scoped>
</style>
